package com.app.babygo.obj;

import java.io.Serializable;

import com.app.babygo.help.ActionHelper;

public class AchievementTask implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private String taskid;
	private String taskname;
	private String taskdescription;
	
	public AchievementTask() {
		this.taskid = null;
		this.taskname = null;
		this.taskdescription = null;
	}

	public AchievementTask(String name, String taskDescription) {
		// create a custom task
		this.taskid = ActionHelper.TaskIdGenerater();
		this.taskname = name;
		this.taskdescription = taskDescription;
	}
	
	public AchievementTask(int id, String name, String taskDescription) {
		// create a pre-defined task
		this.taskid = "#" + id; //use a special char "#" to distinguish custom task
		this.taskname = name;
		this.taskdescription = taskDescription;
	}

	public String getTaskid() {
		return taskid;
	}

	public void setTaskid(String taskid) {
		this.taskid = taskid;
	}

	public String getTaskname() {
		return taskname;
	}

	public void setTaskname(String taskname) {
		this.taskname = taskname;
	}

	public String getTaskdescription() {
		return taskdescription;
	}

	public void setTaskdescription(String taskdescription) {
		this.taskdescription = taskdescription;
	}
	
	public String toString() {
		return "AchievementTask: [id: " + taskid + 
			   ", name: " + taskname + 
			   ", description: " + taskdescription + "]";
	}
}
